package com.it.reggie.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.it.reggie.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CategoryMapper extends BaseMapper<Category> {


    @Select("select count(*) from category;")
    int selectTotalCount();

    @Select("select * from category where type = #{type};")
    List<Category> list(int type);

    @Select("select * from reggie.category;")
    List<Category> listAll();
}
